﻿using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;

namespace Nirvana
{
    [CustomEditor(typeof(AccordionElement), true)]
    [CanEditMultipleObjects]
    public class AccordionElementEditor : Editor
    {

        private SerializedProperty content;
        private SerializedProperty m_IsOn;
        private SerializedProperty m_Interactable;
        private SerializedProperty m_Group;

        private void OnEnable()
        {
            if (this.target == null)
            {
                return;
            }
            SerializedObject serializedObject = base.serializedObject;
            this.content = serializedObject.FindProperty("content");
            this.m_IsOn = serializedObject.FindProperty("m_IsOn");
            this.m_Interactable = serializedObject.FindProperty("m_Interactable");
            this.m_Group = serializedObject.FindProperty("m_Group");
        }

        public override void OnInspectorGUI()
        {
            base.serializedObject.Update();
            EditorGUILayout.PropertyField(this.content, new GUILayoutOption[0]);
            EditorGUILayout.PropertyField(this.m_IsOn, new GUILayoutOption[0]);
            EditorGUILayout.PropertyField(this.m_Interactable, new GUILayoutOption[0]);
            EditorGUILayout.PropertyField(this.m_Group, new GUILayoutOption[0]);
            base.serializedObject.ApplyModifiedProperties();
        }
    }
}

